﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001B6 RID: 438
	public class THiveCreateFunction : TCustomSqlStatement
	{
		// Token: 0x06000E98 RID: 3736 RVA: 0x0030A454 File Offset: 0x00308654
		public THiveCreateFunction(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveCreateFunction;
		}

		// Token: 0x170002A4 RID: 676
		// (get) Token: 0x06000E99 RID: 3737 RVA: 0x0030A468 File Offset: 0x00308668
		// (set) Token: 0x06000E9A RID: 3738 RVA: 0x0030A470 File Offset: 0x00308670
		public virtual TObjectName AsName
		{
			get
			{
				return this.asName;
			}
			set
			{
				this.asName = value;
			}
		}

		// Token: 0x170002A5 RID: 677
		// (get) Token: 0x06000E9B RID: 3739 RVA: 0x0030A479 File Offset: 0x00308679
		// (set) Token: 0x06000E9C RID: 3740 RVA: 0x0030A481 File Offset: 0x00308681
		public virtual TObjectName FunctionName
		{
			get
			{
				return this.functionName;
			}
			set
			{
				this.functionName = value;
			}
		}

		// Token: 0x06000E9D RID: 3741 RVA: 0x0030A48C File Offset: 0x0030868C
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TCreateFunctionSqlNode tcreateFunctionSqlNode = (TCreateFunctionSqlNode)this.rootNode;
			this.functionName = tcreateFunctionSqlNode.FunctionName;
			this.asName = tcreateFunctionSqlNode.AsName;
			base.DatabaseObjects.Add(this.functionName);
			return 0;
		}

		// Token: 0x06000E9E RID: 3742 RVA: 0x0030A4E1 File Offset: 0x003086E1
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000E9F RID: 3743 RVA: 0x0030A4F1 File Offset: 0x003086F1
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001336 RID: 4918
		private TObjectName functionName;

		// Token: 0x04001337 RID: 4919
		private TObjectName asName;
	}
}
